package cn.xxliang.platapp.controller;

import cn.xxliang.platapp.common.BaseRespWithData;
import cn.xxliang.platapp.pojo.dto.ProductServiceApplicationReDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import cn.xxliang.platapp.pojo.query.ProductServiceApplicationReQuery;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

@RestController
@RequestMapping("/productServiceApplicationRe")
@Api(tags = "通信服务-APP关系管理")
@Validated
public class ProductServiceApplicationReController {

    @PostMapping("/add")
    @ApiOperation("添加通信服务-APP关系")
    public BaseRespWithData add(@RequestBody @Valid ProductServiceApplicationReDto dto) {
        return new BaseRespWithData().code(200).msg("添加成功");
    }

    @GetMapping("/get")
    @ApiOperation("查询通信服务-APP关系")
    public BaseRespWithData get(@RequestParam @NotNull(message = "主键不能为空") String serviceApplicationReId) {
        return new BaseRespWithData().code(200).msg("查询成功");
    }

    @GetMapping("/delete")
    @ApiOperation("删除通信服务-APP关系")
    public BaseRespWithData delete(@RequestParam @NotNull(message = "主键不能为空") String serviceApplicationReId) {
        return new BaseRespWithData().code(200).msg("删除成功");
    }

    @PostMapping("/update")
    @ApiOperation("更新通信服务-APP关系")
    public BaseRespWithData update(@RequestBody @Valid ProductServiceApplicationReDto dto) {
        return new BaseRespWithData().code(200).msg("更新成功");
    }

    @PostMapping("/list")
    @ApiOperation("查询通信服务-APP关系列表")
    public BaseRespWithData list(@RequestBody @Valid ProductServiceApplicationReQuery query) {
        return new BaseRespWithData().code(200).msg("查询成功");
    }
}


